﻿using System;
using System.Drawing;
using System.Windows.Forms;

namespace WallNaming
{
	public class TreeListViewEditor
	{
		public static TreeListViewItem AddRootItem(string name, int imageIndex, TreeListView parent)
		{
			TreeListViewItem treeListViewItem = new TreeListViewItem(name, imageIndex);
			treeListViewItem.BackColor = Color.LightGray;
			treeListViewItem.Expand();
			parent.Items.Add(treeListViewItem);
			return treeListViewItem;
		}

		public static TreeListViewItem AddItem(string name, int imageIndex, TreeListViewItem parent)
		{
			TreeListViewItem treeListViewItem = new TreeListViewItem(name, imageIndex);
			treeListViewItem.Expand();
			parent.Items.Add(treeListViewItem);
			return treeListViewItem;
		}

		public static ListViewItem.ListViewSubItem AddColumnItem(string value, TreeListViewItem parent)
		{
			return parent.SubItems.Add(value);
		}
	}
}
